package serviceimpl;

import mapper.SightMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import po.Line;
import po.Sight;
import service.SightService;

import java.util.List;

/**
 * Created by apple on 2017/10/21.
 */

@Component
public class SightServiceImpl implements SightService {


    @Autowired
    private SightMapper sightMapper;

    @Override
    public boolean createSightInfo(Sight sight) {
        return sightMapper.insertSight(sight);
    }

    @Override
    public boolean deleteSightInfo(Sight sight) {
        return sightMapper.deleteSightByName(sight.getSightname());
    }

    @Override
    public Sight selectSightBySightId(Integer sightid) {
        return sightMapper.selectSightBySightId(sightid);
    }

    @Override
    public Sight selectSightBySightName(String sightname) {
        return sightMapper.selectSightByName(sightname);
    }

    @Override
    public List<Sight> selectAllSightsInLine(Line line) {
        return null;
    }
}
